package com.yanqu.road.entity.tradewar;

import com.yanqu.road.entity.DataObject;

import java.util.ArrayList;
import java.util.List;

public class TradeWarActivityJoinUnion extends DataObject {
    private int activityId;
    private int groupId;
    private List<String> unionUidList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public List<String> getUnionUidList() {
        return unionUidList;
    }

    public void setUnionUidList(List<String> unionUidList) {
        this.unionUidList = unionUidList;
        setUpdateOption();
    }

    public boolean hasUnionUid(String unionUid){
        return unionUidList.contains(unionUid);
    }

    public void addUnionUid(String unionUid){
        if(!hasUnionUid(unionUid)){
            unionUidList.add(unionUid);
            setUpdateOption();
        }
    }

    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if (this.groupId != groupId){
            this.groupId = groupId;
            setUpdateOption();
        }
    }
}
